const dropdowmList = document.querySelector('.dropdowm-list')
const groupMembers = document.querySelector('.group-members')
groupMembers.addEventListener('mouseenter', () => {
  dropdowmList.classList.add('active')
})
groupMembers.addEventListener('mouseleave', () => {
  dropdowmList.classList.remove('active')
})
// 白天黑夜切换按钮
const input = document.querySelector('.switch input')
input.addEventListener('click', () => {
  const element = document.body
  const slide = document.querySelector('.slide')
  const slideItem = document.querySelector('.slide-item')
  element.classList.toggle('dark-mode')
  slide.classList.toggle('slideBack')
  slideItem.classList.toggle('slide-items')
  const monster = document.querySelector('.monster')
  monster.style.opacity = 1
  monster.style.animation = 'come-in 3s ease-in'
  if (!document.querySelector('.slideBack')) {
    monster.style.animation = 'come-out 3s ease-out'
    monster.style.opacity = 0
  }
})